package com.campus.food.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 购物车实体类
 * 对应数据库表：t_cart
 * 
 * @author Claude3.7 Sonnet
 * @since 2025-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Cart {
    
    /**
     * 购物车ID
     */
    private Long id;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 商家ID
     */
    private Long merchantId;
    
    /**
     * 菜品ID
     */
    private Long foodId;
    
    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 备注
     */
    private  String remark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
} 